 <!-- Example table --> <div class="container_12"> 
      <div class="module">
                     <h2><span>Edit Gift</span></h2>
                        
                     <div class="module-body">
                         <div style="margin-top:13px;">
                        <?php
                        if(isset($errMsg)){?>
                        <span class="notification"><?php echo $_MESSESGE[$errMsg];?></span>
                        <?php }?></div>
                        
                        <form name="admin_frm" id="admin_frm" action="" method="post" enctype="multipart/form-data">
                        
                            <p>
                                <label>Name</label>
								<div id="availability_info"></div>
                                <input type="text" class="input-short check_availability" name="name" value="<?php echo $result['name'];?>" />
                                <!-- <span class="notification-input ni-correct">This is correct, thanks!</span> -->
                            </p>
                            
                            <p>
                                <label>Reward Points</label>
                                <input type="text" class="input-short" name="reward_point" value="<?php echo $result['reward_point'];?>" /><!-- <span class="notification-input ni-error">Sorry, try again.</span> -->
                            </p>
                            
                            <p>
                                <label>Description</label>
                                <textarea rows="7" cols="90" class="input-medium" name="description"><?php echo $result['description'];?></textarea>
                            </p>
                                                        
                            <p>
                                <label>Upload Gift Image</label>
                                <input type="file" name="image">
                            </p>
                            
                            <fieldset>
                                <input class="submit-green" type="submit" name="submit" value="Submit" /> 
                                <input class="submit-gray" type="button" value="Cancel" onclick="javascript: window.location='<?php echo _SITE_ADMIN_URL_?>'+'gifts/gift_mng.php';" />
                            </fieldset>
                        </form>
                     </div> <!-- End .module-body -->

                </div>  <!-- End .module -->
                </div>
                <div style="clear:both;"></div>
<script type="text/javascript">
	var root_path = '<?php echo _SITE_ADMIN_URL_?>';
	var table = 'gifts';
	var field = 'name';
	
	$().ready(function() {
    	$("#admin_frm").validate({
			rules: {
				name: "required",
				reward_point: {
					required:true,
					number:true
				},
				description: "required"
			},
			messages: {
				name: "Please enter theme name",
				reward_point: "Please enter reward point",
				description: "Please enter description"
			}
		});
	});
</script>                
<script type="text/javascript" src="<?php echo _ADMIN_JS_; ?>check_availability.js"></script>